<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>gown.js example: scrollbar</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            background-color: #000000;
        }
    </style>
    <script src="../../lib/pixi/pixi.js"></script>
    <script src="../../dist/gown.js"></script>
</head>
<body>
<script>
    var stage = new PIXI.Container();
    var sizes = {w: 800, h: 600};
    var renderer = PIXI.autoDetectRenderer(sizes.w, sizes.h, {backgroundColor : 0xffffff});
    document.body.appendChild(renderer.view);

    var txt;

    function onComplete() {
        txt = new GOWN.TextInput();
        txt.text = 'change me!';
        txt.width = 200;
        txt.height = 30;
        txt.y = txt.x = 20;
        stage.addChild(txt);

        var txt2 = new GOWN.TextInput();
        txt2.text = '...or me!';
        txt2.width = 200;
        txt2.height = 30;
        txt2.x = 20;
        txt2.displayAsPassword = true;
        txt2.y = 70;
        stage.addChild(txt2);

        var textArea = new GOWN.TextArea();
        textArea.text = 'And this text is a bit longer so I put it inside a text area. Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'
        textArea.height = 200;
        textArea.width = 200;
        textArea.x = 20;
        textArea.y = 120;
        stage.addChild(textArea);

        requestAnimationFrame(animate);
    }

    var theme = new GOWN.ThemeParser("../../themes/assets/aeon_desktop/aeon_desktop.json");
    theme.once(GOWN.Theme.COMPLETE, onComplete, this);

    function animate() {
        // render the stage
        renderer.render(stage);
        requestAnimationFrame(animate);
    }
    GOWN.loader.load();
</script>

</body>
</html>
